using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;
using Volo.Abp.Domain.Entities.Auditing;

namespace TaskTodo.Todos
{
    public class Todo : FullAuditedAggregateRoot<long>
    {
        /// <summary>
        /// 标题
        /// </summary>
        public virtual string Title { get; set; }

        /// <summary>
        /// 待办任务详细描述
        /// </summary>
        public virtual string Detail { get; set; }

        /// <summary>
        /// 测试情况
        /// </summary>
        public virtual TodoTestItem IsTestOk { get; set; }

        /// <summary>
        /// 测试次数
        /// </summary>
        public virtual int TestTimes { get; set; }

        /// <summary>
        /// 测试意见
        /// </summary>
        public virtual string TestOpinion { get; set; }

        /// <summary>
        /// 预期完成时间
        /// </summary>
        public virtual DateTime? EstimatedTime { get; set; }

        /// <summary>
        /// 完成时间
        /// </summary>
        public virtual DateTime? CompletionTime { get; set; }

        /// <summary>
        /// 阶段
        /// </summary>
        public virtual TodoStage Stage { get; set; }

        /// <summary>
        /// 置顶
        /// </summary>
        public virtual bool PlacedAttheTop { get; set; }

        /// <summary>
        /// 紧急程度
        /// </summary>
        public virtual UrgencyDegree UrgencyDegree { get; set; }

        /// <summary>
        /// 是否结束
        /// </summary>
        public virtual bool Done { get; set; }

        protected Todo()
        {
        }

        public Todo(
            long id,
            string title,
            string detail,
            TodoTestItem isTestOk,
            int testTimes,
            string testOpinion,
            DateTime? estimatedTime,
            DateTime? completionTime,
            TodoStage stage,
            bool placedAttheTop,
            UrgencyDegree urgencyDegree,
            bool done
        ) : base(id)
        {
            Title = title;
            Detail = detail;
            IsTestOk = isTestOk;
            TestTimes = testTimes;
            TestOpinion = testOpinion;
            EstimatedTime = estimatedTime;
            CompletionTime = completionTime;
            Stage = stage;
            PlacedAttheTop = placedAttheTop;
            UrgencyDegree = urgencyDegree;
            Done = done;
        }
    }
}
